package com.yaorange.module.association.mapper;

import com.yaorange.module.association.dto.BsNewsDto;
import com.yaorange.pojo.BsNews;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface BsNewsMapper {

    List<BsNews> selectPage(BsNewsDto bsNewsDto);

    @Select("select * from bs_news")
    void selectAll(BsNews bsNews);

    @Update("update bs_news set news_type=#{newsType}, title = #{title},thumbnail = #{thumbnail},source = #{source},content = #{content},top_flag = #{topFlag},status=#{status},update_time = #{updateTime} where id = #{id}")
    void update(BsNews bsNews);


    void add(BsNews bsNews);
}
